package com.we.tickets.controller;

import com.alibaba.fastjson.JSONObject;
import com.we.tickets.service.ReviewService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/review")
public class ReviewController {
    @Autowired
    private ReviewService reviewService;

    @PostMapping("/addReview")
    public JSONObject addReview(@RequestBody JSONObject jsonObject) {
        return reviewService.addReview(jsonObject);
    }

    @PostMapping("/getEventReviewHashes")
    public JSONObject getEventReviewHashes(@RequestBody JSONObject jsonObject) {
        return reviewService.getEventReviewHashes(jsonObject);
    }
}
